package com.xysoft.framework.model;

public abstract class AbstractLazyModel<T> extends AbstractReadOnlyModel<T> {

	private T value;
	private boolean loaded = true;
	
	@Override
	public T getObject() {
		if(!loaded) {
			value = load();
			loaded = true;
		}
		return value;
	}
	
	protected abstract T load();

}
